package com.tl.boot.common.config;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * com.tl.boot.config -- TokenConfig
 * Description:
 * Created by joshua_liu <a href="mailto:joshualwork@163.com"></a>
 * On 2019/9/11 9:44
 */
@Component
@ConfigurationProperties(prefix = "tokenConfig")
public class TokenConfig {
    private String salt;

    private Long validDays;

    public Long getValidTime() {
        return validDays * 24 * 60 * 60 * 1000;
    }

    public String getSalt() {
        return salt;
    }

    public void setSalt(String salt) {
        this.salt = salt;
    }

    public Long getValidDays() {
        return validDays;
    }

    public void setValidDays(Long validDays) {
        this.validDays = validDays;
    }
}
